package com.naiterui.ehp.bs.wechat.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.naiterui.ehp.bs.wechat.protocol.result.UserInfo;
import com.naiterui.ehp.bs.wechat.service.IAccessTokenService;
import com.naiterui.ehp.bs.wechat.service.IWeChatUserService;
import com.naiterui.ehp.bs.wechat.utils.WeChatApiUtil;

/**
 * @author zhoupeipei
 * @date 2019-07-01 12:47
 * @since 1.0.0
 */
@Service
public class WeChatUserServiceImpl implements IWeChatUserService {
    @Autowired
    IAccessTokenService accessTokenService;
    @Override
    public UserInfo userInfo(String openId) {
       return WeChatApiUtil.getPaUserInfo(accessTokenService.accessToken(),openId);
    }
}
